package org.sai.wxnovel.service;

import org.sai.wxnovel.bean.Genres;
import org.sai.wxnovel.dao.GenresDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GenresService {
    @Autowired
    private GenresDao genresDao;

    public List<Genres> getAllGenres(){
        return genresDao.findAll();
    }

    public Genres getGenresById(Integer id) {
        return genresDao.findById(id);
    }
}
